﻿IF object_id(N'dbo.TabMailAttachFiles', 'U') IS NULL
BEGIN
    CREATE TABLE [dbo].[TabMailAttachFiles] (
        [FileID]         int          NOT NULL identity(1, 1),
        [MailID]         int          NOT NULL,
        [FileName]       nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileSize]       int          NULL,
        [FileAttribute]  int          NULL,
        [FileVisualPath] nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileAuthor]     nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileCatlog]     nvarchar(255) COLLATE Chinese_PRC_CI_AS NULL,
        [FileAddedDate]  datetime     NULL CONSTRAINT [DF_TabMailAttachFiles_FileAddedDate] default((getdate())),

        CONSTRAINT [PK_TabMailAttachFiles] PRIMARY KEY CLUSTERED ([FileID] asc)
    );
END
GO
